class  FactoryBaseInfoModel{
  String comCity;
  String comAddress;
  String comName;
  String comTel;
  String legalMobile;
  String legalName;
  String legalSex;
 String lat;
  String lng;
  String detail;

  String get legalSexStr{
    return int.parse(legalSex) == 1?'男':int.parse(legalSex) == 2?'女':'';
  }
  FactoryBaseInfoModel(
      {this.comCity,
      this.comAddress,
      this.comName,
      this.comTel,
      this.legalMobile,
      this.legalName,
      this.legalSex,
     this.lat,
     this.lng,
      this.detail});

  FactoryBaseInfoModel.fromJson(Map<String, dynamic> json) {
    comCity = json['comCity'];
    comAddress = json['com_address'];
    comName = json['com_name'];
    comTel = json['com_tel'];
    legalMobile = json['legal_mobile'];
    legalName = json['legal_name'];
    legalSex = json['legal_sex'].toString();
    lat = json['lat'];
    lng=json['lng'];
    detail = json['detail'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['comCity'] = this.comCity;
    data['com_address'] = this.comAddress;
    data['com_name'] = this.comName;
    data['com_tel'] = this.comTel;
    data['legal_mobile'] = this.legalMobile;
    data['legal_name'] = this.legalName;
    data['legal_sex'] = this.legalSex;
    data['lat'] = this.lat;
    data['lng'] = this.lng;
    data['detail'] = this.detail;
    return data;
  }
}
